home *** CD-ROM | disk | FTP | other *** search
- on DrawTip tip, pt
- pt = pt + point(5, 40)
- sendSprite(437, #turnOff)
- imgWidth = 55
- imgHeight = 15
- CreateTextImage(84, "fonts", imgWidth, imgHeight, "tiptext")
- pt1 = "+" & string(tip)
- DrawText(84, "fonts", pt1, 1, "y", 0, 0)
- firstx = pt1.char.count * 8
- img = member(84, "fonts").image
- mem1 = 160
- srcRect = member(mem1, "fonts").rect
- dstRect = rect(firstx, 0, firstx + srcRect.right, 0 + srcRect.bottom)
- img.copyPixels(member(mem1, "fonts").image, dstRect, srcRect)
- sendSprite(437, #turnOn, pt)
- end
-
- on DrawLose tip, pt
- tip = abs(tip)
- if sendSprite(438, #getGoing) = 0 then
- wha = 1
- else
- if sendSprite(439, #getGoing) = 0 then
- wha = 2
- else
- wha = 3
- sendSprite(440, #turnOff)
- end if
- end if
- imgWidth = 70
- imgHeight = 30
- CreateTextImage(87 + wha, "fonts", imgWidth, imgHeight, "losttext")
- pt1 = "-" & string(tip)
- DrawText(87 + wha, "fonts", pt1, 1, "r", 10, 15)
- img = member(87 + wha, "fonts").image
- mem1 = 58
- srcRect = member(mem1, "fonts").rect
- dstRect = rect(0, 0, 0 + srcRect.right, 0 + srcRect.bottom)
- img.copyPixels(member(mem1, "fonts").image, dstRect, srcRect)
- sendSprite(437 + wha, #turnOn, pt)
- end
-
- on DrawColorText mList, pt
- c = mList.count
- yo = 0
- sendSprite(436, #turnOff)
- imgWidth = 100
- imgHeight = 15 * c
- CreateTextImage(83, "fonts", imgWidth, imgHeight, "colortext")
- img = member(83, "fonts").image
- repeat with b = 1 to c
- yo = 15 * (b - 1)
- pt1 = "+" & string(mList[b].sco)
- DrawText(83, "fonts", pt1, 1, "y", 0, yo)
- firstx = pt1.char.count * 8
- mem1 = mList[b].colo + 171
- srcRect = member(mem1, "fonts").rect
- dstRect = rect(firstx, yo, firstx + srcRect.right, yo + srcRect.bottom)
- img.copyPixels(member(mem1, "fonts").image, dstRect, srcRect)
- oxx = dstRect.right
- mem3 = "multX"
- srcRect = member(mem3, "fonts").rect
- dstRect = rect(oxx, yo, oxx + srcRect.right, yo + srcRect.bottom)
- img.copyPixels(member(mem3, "fonts").image, dstRect, srcRect)
- mem2 = "small" & string(mList[b].mult)
- srcRect = member(mem2, "fonts").rect
- dstRect = rect(oxx + 10, yo, oxx + 10 + srcRect.right, yo + srcRect.bottom)
- img.copyPixels(member(mem2, "fonts").image, dstRect, srcRect)
- end repeat
- sendSprite(436, #turnOn, pt)
- end
-
- on DrawScoreText action, mult, sco, special, pt
- pt = pt + point(45, 20)
- sendSprite(435, #turnOff)
- imgHeight = 39
- imgWidth = 100
- line1 = "+" & string(sco)
- line2 = action && "x" && string(mult)
- l1c = line1.char.count
- l2c = line2.char.count
- mem = 82
- castd = "fonts"
- CreateTextImage(mem, castd, imgWidth, imgHeight, "bonusText")
- DrawText(mem, castd, line1, 1, "z", 0, 13)
- img = member(mem, castd).image
- mem1 = action & "-txt"
- srcRect = member(mem1, "fonts").rect
- dstRect = rect(0, 0, srcRect.right, 0 + srcRect.bottom)
- img.copyPixels(member(mem1, "fonts").image, dstRect, srcRect)
- oxx = srcRect.right
- mem3 = "multX"
- srcRect = member(mem3, "fonts").rect
- dstRect = rect(oxx, 0, oxx + srcRect.right, 0 + srcRect.bottom)
- img.copyPixels(member(mem3, "fonts").image, dstRect, srcRect)
- mem2 = "small" & string(mult)
- srcRect = member(mem2, "fonts").rect
- dstRect = rect(oxx + 10, 0, oxx + 10 + srcRect.right, 0 + srcRect.bottom)
- img.copyPixels(member(mem2, "fonts").image, dstRect, srcRect)
- sendSprite(435, #turnOn, pt)
- end
-
- on DrawText mem, castd, txt, lin, big, xo, yo
- if txt = EMPTY then
- return
- end if
- c = txt.char.count
- img = member(mem, castd).image
- repeat with b = 1 to c
- chr = txt.char[b]
- if chr = " " then
- xo = xo + 20
- next repeat
- end if
- mem1 = big & chr
- srcRect = member(mem1, "fonts").rect
- dstRect = rect(xo, yo, xo + srcRect.right, yo + srcRect.bottom)
- img.copyPixels(member(mem1, "fonts").image, dstRect, srcRect)
- if (big = "z") or (big = "r") then
- xo = xo + srcRect.right
- next repeat
- end if
- if big = "y" then
- xo = xo + srcRect.right - 3
- end if
- end repeat
- end
-
- on CreateTextImage mem, castd, wid, hei, nam
- member(mem, castd).erase()
- new(#bitmap, member(mem, castd))
- member(mem, castd).image = image(wid, hei, 32)
- member(mem, castd).name = nam
- member(mem, castd).useAlpha = 1
- member(mem, castd).image.fill(0, 0, wid, hei, rgb(255, 255, 255))
- end
-